package com.aepona.app.util;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

/**
 * Created by IntelliJ IDEA.
 * User: tg40286
 * Date: Mar 21, 2012
 * Time: 4:53:59 PM
 * To change this template use File | Settings | File Templates.
 */
public class Config {
    private static Config instance = new Config();

    private Properties properties;

    private Config() {

        properties = new Properties();
        try {
            properties.load(new FileInputStream("src/main/resources/project.properties"));
            //properties.load(new FileInputStream("/classes/project.properties"));
            ///classes
//            properties.load(new FileInputStream("src/test/resources/test.properties"));
        } catch (IOException e) {
            e.printStackTrace();
            System.exit(0);
        }
    }

    public static Config getConfigs() {

        return instance;
    }

    public String getValue(String key) {

        return properties.getProperty(key);
    }

}

